From: Dmitry Gutov Date: Tue, 25 Dec 2018 15:08:58 +0000 (+0200) Subject: Use rubocop --lint when no .rubocop.yml X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~19^2~4309 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=a361cc88a15e9c39f17145f9acd1ea4a8ca70461;p=emacs.git Use rubocop --lint when no .rubocop.yml * lisp/progmodes/ruby-mode.el (ruby-flymake-rubocop): When no config file found, only run lint cops (bug#31760). --- diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index d60899cf182..2a50374765c 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -2324,7 +2324,8 @@ Only takes effect if RuboCop is installed." (when buffer-file-name (setq config-dir (locate-dominating-file buffer-file-name ruby-rubocop-config)) - (when config-dir + (if (not config-dir) + (setq command (append command '("--lint"))) (setq command (append command (list "--config" (expand-file-name ruby-rubocop-config config-dir)))))